<?php


namespace app\common\entity;


use think\Model;

class ProLog extends Model
{
    protected $table = 'pro_log';

    public function add($num)
    {
        $entity = new self();
        $time = date('Y-m-d H:i');

        $isHas = $entity->where('date',$time)->find();

        if (!$isHas){
            $entity->ratio = $num;
            $entity->date = $time;
            $entity->create_time = time();
            return $entity->save();
        }



    }



}